//2017-9-22
TQKF.kefuimg = {
	version: "2016-10-20",
	isMouseInBox: false,
	DOM: null,
	MiniDOM: null,
	DOMinnerHTML: null,
	isMouseInButton: 0,
	isClosed: false,
	isHided: false,
	isAntiKaKa: true,
	autiTimer: null,
	hasInited: false,
	response_type: 0,
	GetResponseType: function() {
		var t = 0;
		if (!TQUtils.IsUndefined("tq_member_uins") && tq_member_uins != "" && tq_member_uins[0] && tq_member_uins[0].m && tq_member_uins[0].m[0] && tq_member_uins[0].m[0].t == "tactic") {
			t = 1
		} else t = 0;
		return t
	},
	userCfg: {
		ext: "gif",
		s: 0,
		on: "",
		off: "",
		w: "120",
		h: "120",
		cls_w: "130",
		cls_h: "130",
		isnoshowuser: 0,
		isfloat: 1,
		isstatic: 0,
		close: {
			disp: "0",
			t: "2",
			r: "4",
			h: "14",
			w: "14"
		},
		mini: {
			disp: "0",
			s: "1",
			img: "",
			expd: "0",
			animt: "0"
		}
	},
	miniCfg: {
		s1: {
			ext: "png"
		},
		s2: {
			ext: "png"
		},
		s3: {
			ext: "png"
		},
		s100: {
			ext: "png"
		},
		s101: {
			ext: "gif"
		},
		s102: {
			ext: "gif"
		},
		s103: {
			ext: "gif"
		},
		s104: {
			ext: "png"
		}
	},
	CreatDOM: function() {
		if (this.DOM != null) return;
		this.DOM = document.createElement("div");
		this.DOM.id = "tq_kefu_main";
		this.DOM.className = "tq_div_main";
		this.DOM.style.border = "0px ridge #EAEAEA";
		this.DOM.style.visibility = "visible";
		if (this.userCfg.s == 100 && (this.userCfg.w == "" || this.userCfg.h == "")) this.DOM.style.display = "none";
		else this.DOM.style.display = "";
		this.DOM.style.position = "absolute";
		this.DOM.style.top = "-1400px";
		this.DOM.style.zIndex = "9997";
		this.DOM.style.padding = "0px";
		this.DOM.style.background = "transparent none repeat scroll 0% 0%";
		this.DOM.style.textAlign = "center";
		this.DOMinnerHTML = this.DOM.innerHTML = this.CreatDOMInner()
	},
	CreatDOMInner: function() {
		var html = [];
		var onImg = "";
		var offImg = "";
		if (this.userCfg.s == 100 && this.userCfg.on != "" && this.userCfg.off != "") {
			onImg = this.userCfg.on;
			offImg = this.userCfg.off
		} else {
			onImg = TQKF.kefuimg_image_url + "kefu" + this.userCfg.s + (this.userCfg.close.disp == 1 ? "_cls": "") + "." + this.userCfg.ext;
			offImg = TQKF.kefuimg_image_url + "kefu" + this.userCfg.s + "off" + (this.userCfg.close.disp == 1 ? "_cls": "") + "." + this.userCfg.ext
		}
		if (this.IfAllOffLine() == true) onImg = offImg;
		this.DOM.onlineImg = onImg;
		if (this.userCfg.isstatic == 0) {
			html.push("<div id=tq_kefu_normal_container " + (this.userCfg.mini.disp == 1 ? "style='display:none'": "") + ">");
			if (TQUtils.IsFlash(onImg)) {
				html.push(this.CreatFlash())
			} else html.push('<img border="0" src="' + onImg + '" style="BACKGROUND:transparent none repeat scroll 0% 0%;cursor:pointer" onclick=TQKF.kefuimg.Distrabute() />');
			if (this.userCfg.close.disp == 1 || TQKF.userDefined.kefuMiniArea.isShow == 1) {
				html.push("<div onclick=TQKF.kefuimg.Distrabute() style='z-index:2;BACKGROUND:transparent none repeat scroll 0% 0%;cursor: pointer;width:100%;height:" + this.userCfg.close.h + "px;border:0px solid red; position: absolute;left: 0px; top: " + this.userCfg.close.t + "px;'>");
				if (this.userCfg.close.disp == 1) {
					html.push("<div style='overflow:hidden;background-color:#FFFFFF;;opacity:0;filter:Alpha(opacity=0);border:0px;width:" + this.userCfg.close.r + "px;float:right;'>&nbsp;</div>");
					html.push("<div onmouseover='TQKF.kefuimg.isMouseInButton=1' onmouseout='TQKF.kefuimg.isMouseInButton=0' onclick='TQKF.kefuimg." + (parseInt(this.userCfg.mini.disp) > 0 ? "Shrink()": "Close()") + "' style='background-color:#FFFF00;opacity:0;filter:Alpha(opacity=0);border:0px;height:" + this.userCfg.close.h + "px;width:" + this.userCfg.close.w + "px;float:right;cursor: pointer' title='" + TQKF.words[1] + "'>&nbsp;&nbsp;</div>")
				}
				if (TQKF.userDefined.kefuMiniArea.isShow == 1) {
					html.push("<div style='overflow:hidden;background-color:#FFFFFF;;opacity:0;filter:Alpha(opacity=0);border:0px;width:" + TQKF.userDefined.kefuMiniArea.rightSpace + "px;float:right;'>&nbsp;</div>");
					html.push("<div onmouseover='TQKF.kefuimg.isMouseInButton=1' onmouseout='TQKF.kefuimg.isMouseInButton=0' id=tq_kefuMiniArea onclick='TQKF.kefuimg.Mini()' style='background-color:#FFFF00;opacity:0;filter:Alpha(opacity=0);border:0px;height:" + TQKF.userDefined.kefuMiniArea.height + "px;width:" + TQKF.userDefined.kefuMiniArea.width + "px;float:right;cursor: pointer' title='" + TQKF.words[8] + "'>&nbsp;&nbsp;</div>")
				}
				html.push("</div>")
			}
			html.push("</div>");
			if (this.userCfg.mini.disp != 0) {
				html.push("<div id=tq_kefu_mini_container " + (this.userCfg.mini.disp == 2 ? "style='display:none'": "") + ">");
				html.push('<img border="0" src="' + this.CreatMiniImgURL() + '" style="BACKGROUND:transparent none repeat scroll 0% 0%;cursor:pointer" ' + (this.userCfg.mini.expd == 0 ? 'onmouseover': 'onclick') + '="TQKF.kefuimg.Expend()" />');
				html.push("</div>")
			}
		} else {
			try {
				TQUtils.GetObj("tracqfloater").onclick = function() {
					TQKF.kefuimg.Distrabute()
				}
			} catch(e) {}
		}
		return html.join('')
	},
	CreatMiniImgURL: function() {
		var align = "l";
		if (parseInt(tq_float_right) < 0) align = "r";
		return this.userCfg.mini.s == 100 ? this.userCfg.mini.img: (TQKF.float_image_url + 'mini/s' + this.userCfg.mini.s + '/c1/mini_' + align + '.' + this.miniCfg["s" + this.userCfg.mini.s].ext)
	},
	CreatMiniDOM: function() {
		this.MiniDOM = document.createElement("div");
		this.MiniDOM.className = "tq_div_main";
		this.MiniDOM.id = "tq_kefu_mini";
		this.MiniDOM.style.visibility = "hidden";
		this.MiniDOM.style.position = "absolute";
		this.MiniDOM.style.zIndex = "10000";
		this.MiniDOM.onlineImg = TQKF.userDefined.kefuMiniArea.miniImgOnline;
		if (this.IfAllOffLine() == true) this.MiniDOM.onlineImg = TQKF.userDefined.kefuMiniArea.miniImgOffline;
		this.MiniDOM.style.border = "0px solid #EAEAEA";
		this.MiniDOM.style.padding = "0px";
		this.MiniDOM.style.background = "transparent none repeat scroll 0% 0%";
		this.MiniDOM.style.textAlign = "center";
		this.MiniDOM.innerHTML = this.CreatMiniDOMInner()
	},
	CreatMiniDOMInner: function() {
		var htmlMini = [];
		htmlMini.push("<img border='0' src='" + this.MiniDOM.onlineImg + "' style='BACKGROUND:transparent none repeat scroll 0% 0%;cursor:pointer' onclick=TQKF.kefuimg.Distrabute() />");
		htmlMini.push("<div onclick=TQKF.kefuimg.Distrabute() style='BACKGROUND:transparent none repeat scroll 0% 0%;cursor: pointer;width:100%;height:20px;border:0px solid red; position: absolute;left: -5px; top: 5px;'>");
		if (this.userCfg.close.disp == 1) {
			htmlMini.push("<div style='overflow:hidden;background-color:#FFFFFF;;opacity:0;filter:Alpha(opacity=0);border:0px;width:" + this.userCfg.close.r + ";float:right;'>&nbsp;</div>");
			htmlMini.push("<div onmouseover='TQKF.kefuimg.isMouseInButton=1' onmouseout='TQKF.kefuimg.isMouseInButton=0' onclick='TQKF.kefuimg.HideMini()' style='background-color:#FFFF00;opacity:0;filter:Alpha(opacity=0);border:0px;height:" + this.userCfg.close.h + ";width:" + this.userCfg.close.w + ";float:right;cursor: pointer' title='" + TQKF.words[1] + "'>&nbsp;&nbsp;</div>")
		}
		htmlMini.push("<div style='overflow:hidden;background-color:#FFFFFF;;opacity:0;filter:Alpha(opacity=0);border:0px;width:" + TQKF.userDefined.kefuMiniArea.rightSpace + "px;float:right;'>&nbsp;</div>");
		htmlMini.push("<div id=tq_kefuMiniArea onmouseover='TQKF.kefuimg.isMouseInButton=1' onmouseout='TQKF.kefuimg.isMouseInButton=0' onclick='TQKF.kefuimg.Max()' style='background-color:#FFFF00;opacity:0;filter:Alpha(opacity=0);border:0px;height:" + TQKF.userDefined.kefuMiniArea.height + "px;width:" + TQKF.userDefined.kefuMiniArea.width + "px;float:right;cursor: pointer' title='" + TQKF.words[16] + "'>&nbsp;&nbsp;</div>");
		htmlMini.push("</div>");
		return htmlMini.join("")
	},
	CreatFlash: function() {
		var html = [];
		html.push('<div style="z-index:1;width:' + TQKF.kefuimg.userCfg.w + 'px;height:' + TQKF.kefuimg.userCfg.h + 'px;position:absolute;left:0px;top:0px;cursor: pointer;background-color:#FFFFFF;;opacity:0;filter:Alpha(opacity=0);border:0px;background-image:none" onclick=TQKF.kefuimg.Distrabute() >&nbsp;</div>');
		html.push('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="' + TQKF.kefuimg.userCfg.w + '" height="' + TQKF.kefuimg.userCfg.h + '">');
		html.push('<param name="movie" value="' + TQKF.kefuimg.DOM.onlineImg + '" />');
		html.push('<param name="allowScriptAccess" value="always" />');
		html.push('<PARAM NAME="WMode" VALUE="Transparent">');
		html.push('<embed width="' + TQKF.kefuimg.userCfg.w + '" height="' + TQKF.kefuimg.userCfg.h + '" src="' + TQKF.kefuimg.DOM.onlineImg + '" quality="High" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="Transparent" allowscriptaccess="always"></embed>');
		html.push('</object>');
		return html.join("")
	},
	AppendDOM: function() {
		TQUtils.AppendDOM(TQKF.kefuimg.DOM);
		if (TQKF.userDefined.kefuMiniArea.isShow == 1) {
			TQUtils.AppendDOM(TQKF.kefuimg.MiniDOM)
		}
	},
	SetPos: function() {
		if (TQUtils.isSupportFixedPos && TQKF.kefuimg.userCfg.isfloat == 1) {
			var o = TQKF.kefuimg.DOM;
			o.style.position = 'fixed';
			o.style.top = tq_top + "px";
			if (parseInt(tq_float_right) < 0) {
				o.style.right = TQKF.kefuimg.userCfg.mini.disp != 0 ? "0px": ( - (parseInt(tq_float_right)) + "px");
				o.style.width = "auto"
			} else {
				o.style.left = TQKF.kefuimg.userCfg.mini.disp != 0 ? "0px": (parseInt(tq_float_right) + "px")
			}
			if (TQKF.userDefined.kefuMiniArea.isShow == 1) {
				var o = TQKF.kefuimg.MiniDOM;
				o.style.position = 'fixed';
				o.style.bottom = "0px";
				if (TQKF.userDefined.kefuMiniArea.miniPos == "RB") {
					o.style.right = "0px"
				} else {
					o.style.left = "0px"
				}
			}
		} else {
			TQKF.kefuimg.fixPos()
		}
	},
	fixPos: function() {
		var o = TQKF.kefuimg.DOM;
		o.style.top = TQUtils.GetScrollTop() + parseInt(tq_top) + 'px';
		if (parseInt(tq_float_right) < 0) {
			if (TQKF.kefuimg.userCfg.mini.disp != 0) o.style.left = (TQUtils.GetScrollLeft() + TQUtils.GetWinSize().w - o.offsetWidth) + "px";
			else o.style.left = (TQUtils.GetScrollLeft() + TQUtils.GetWinSize().w - o.offsetWidth + parseInt(tq_float_right)) + "px"
		} else {
			if (TQKF.kefuimg.userCfg.mini.disp != 0) o.style.left = TQUtils.GetScrollLeft() + 'px';
			else o.style.left = TQUtils.GetScrollLeft() + (parseInt(tq_float_right)) + 'px'
		}
		if (TQKF.userDefined.kefuMiniArea.isShow == 1) {
			var o = TQKF.kefuimg.MiniDOM;
			o.style.top = TQUtils.GetScrollTop() + TQUtils.GetWinSize().h - o.offsetHeight + 'px';
			if (TQKF.userDefined.kefuMiniArea.miniPos == "RB") {
				o.style.left = (TQUtils.GetScrollLeft() + TQUtils.GetWinSize().w - o.offsetWidth) + "px"
			} else {
				o.style.left = TQUtils.GetScrollLeft() + "px"
			}
		}
	},
	Shrink: function() {
		if (TQKF.kefuimg.isMouseInBox) return;
		TQUtils.GetObj("tq_kefu_normal_container").style.display = "none";
		TQUtils.GetObj("tq_kefu_mini_container").style.display = "";
		TQKF.kefuimg.isMouseInBox = true;
		this.SetPos();
		setTimeout(function() {
			TQKF.kefuimg.isMouseInBox = false
		},
		1000)
	},
	Expend: function() {
		if (TQKF.kefuimg.isMouseInBox) return;
		TQUtils.GetObj("tq_kefu_normal_container").style.display = "";
		TQUtils.GetObj("tq_kefu_mini_container").style.display = "none";
		TQKF.kefuimg.isMouseInBox = true;
		this.SetPos();
		setTimeout(function() {
			TQKF.kefuimg.isMouseInBox = false
		},
		1000)
	},
	Mini: function() {
		this.Hide();
		this.ShowMini()
	},
	Max: function() {
		this.DOM.style.visibility = "visible";
		this.HideMini()
	},
	Close: function() {
		this.isClosed = true;
		this.Hide();
		clearInterval(TQKF.kefuimg.autiTimer)
	},
	Hide: function() {
		this.isHided = true;
		this.DOM.style.visibility = "hidden"
	},
	Show: function() {
		if (this.isClosed == true) return;
		this.isHided = false;
		this.DOM.style.visibility = "visible";
		if (TQKF.userDefined.kefuMiniArea.isShow == 1) {
			this.HideMini()
		}
	},
	ShowMini: function() {
		this.MiniDOM.style.visibility = "visible"
	},
	HideMini: function() {
		this.MiniDOM.style.visibility = "hidden"
	},
	GetOnlineStatus: function() {
		if (TQKF.kefuimg.isClosed == true) return;
		var str = [];
		for (var i = 0; i < tq_member_uins.length; i++) {
			for (var j = 0; j < tq_member_uins[i].m.length; j++) {
				var m = tq_member_uins[i].m[j];
				if (m.t == "tq" || m.t == "tactic") {
					str.push("{\"t\":\"" + m.t + "\",\"id\":\"" + m.id + "\"}")
				}
			}
		}
		var rstr = str.join(",");
		var rq_url = TQKF.float_server_url + "/getonlinestatus.js?adminid=" + tq_adminid + "&m=[" + rstr + "]&callback=TQKF.kefuimg.RefreshOnlineStatus&nocache=" + Math.random();
		TQUtils.LoadJSAndAutoRemoveSelf("TQGetonlinestatus_JS_kefuimg", rq_url);
		TQKF.getOnlineFlagInteval += 2000;
		setTimeout(TQKF.kefuimg.GetOnlineStatus, TQKF.getOnlineFlagInteval)
	},
	RefreshOnlineStatus: function(m_flags) {
		var index = 0;
		for (var i = 0; i < tq_member_uins.length; i++) {
			for (var j = 0; j < tq_member_uins[i].m.length; j++) {
				var m = tq_member_uins[i].m[j];
				if (m.t == "tq" || m.t == "tactic") {
					m.o = m_flags[index].o;
					index++
				}
			}
		}
		TQKF.kefuimg.DOMinnerHTML = TQKF.kefuimg.DOM.innerHTML = TQKF.kefuimg.CreatDOMInner();
		if (TQKF.userDefined.kefuMiniArea.isShow == 1) {
			TQKF.kefuimg.MiniDOM.innerHTML = TQKF.kefuimg.CreatMiniDOMInner()
		}
	},
	Distrabute: function() {
		if (TQKF.kefuimg.isMouseInButton == 1) retuen;
		if (typeof(TQKF.userDefined.kefuClickEvent) != "undefined" && TQKF.userDefined.kefuClickEvent != null) {
			try {
				eval(TQKF.userDefined.kefuClickEvent + "()")
			} catch(e) {}
			return
		}
		if (TQKF.kefuimg.response_type == 1) {
			TQKF.OpenWindow(TQKF.CreatURL(TQKF.pageinfo_url, "acd", "", tq_member_uins[0].m[0].id, "kefuimg"), "")
		} else {
			if (this.IfAllOffLine() == false && tq_useraccount == "1" && !TQUtils.IsUndefined("tq_appuin") && tq_appuin != "") {
				TQKF.OpenWindow(TQKF.CreatURL(TQKF.webchat_url2, "chat", tq_appuin, "", "kefuimg"), tq_appuin)
			} else {
				var onlineflag = TQKF.ONLINE;
				var action = "chat";
				var url = TQKF.webchat_url2;
				var who = tq_adminid;
				if (this.IfAllOffLine() == true) {
					onlineflag = TQKF.OFFLINE;
					action = "leavemsg";
					url = TQKF.leavemsg_url
				}
				var tqnum = 0;
				for (var i = 0; i < tq_member_uins[0].m.length; i++) {
					if (tq_member_uins[0].m[i].t == "tq" && TQUtils.isInCode(tq_member_uins[0].m[i].o, onlineflag)) {
						TQKF.onlineUins[tqnum] = tq_member_uins[0].m[i].id;
						tqnum++
					}
				}
				if (TQKF.onlineUins.length > 0) {
					var tqpos = Math.round(Math.random() * (tqnum - 1));
					who = TQKF.onlineUins[tqpos]
				}
				TQKF.OpenWindow(TQKF.CreatURL(url, action, who, "", "kefuimg"), who)
			}
		}
	},
	IfAllOffLine: function() {
		if (TQKF.kefuimg.response_type == 1) {
			if (TQUtils.isInCode(tq_member_uins[0].m[0].o, TQKF.ONLINE)) return false;
			else return true
		} else if (tq_member_uins[0].m.length > 0) {
			var m = tq_member_uins[0].m;
			for (var i = 0; i < m.length; i++) {
				if (m[i].t == "tq" && TQUtils.isInCode(m[i].o, TQKF.ONLINE)) {
					return false
				}
			}
			return true
		}
	},
	Anti: function() {
		TQKF.kefuimg.AntiKaKa(TQKF.kefuimg.DOM, "TQKF.kefuimg", TQKF.kefuimg.DOMinnerHTML)
	},
	AntiKaKa: function(div, checkElement, savedHTML) {
		if (TQKF.kefuimg.isAntiKaKa && !TQKF.kefuimg.isClosed && !TQKF.kefuimg.isHided) {
			if (div.innerHTML.indexOf(checkElement) == -1) {
				div.innerHTML = savedHTML;
				TQKF.kefuimg.isAntiKaKa = false
			}
			if (div.style.visibility == "hidden") div.style.visibility = "visible";
			if (div.style.display == "none") div.style.display = ""
		}
	},
	Init: function() {
		TQ_DEBUG("TQKF.kefuimg.Init()", 3);
		if (TQKF.kefuimg.hasInited) return;
		TQKF.kefuimg.hasInited = true;
		if (TQKF.kefuimg.userCfg.isstatic == 1) {
			if (TQUtils.IsFlash(TQKF.kefuimg.DOM.onlineImg)) {
				if (TQUtils.GetObj("tq_kefu_main") && (TQUtils.GetObj("tq_kefu_main").getAttribute("version") + "s" != "undefineds")) {
					var html = [];
					html.push(TQKF.kefuimg.CreatFlash());
					TQUtils.GetObj("tq_kefu_main").innerHTML = '';
					var span = document.createElement("span");
					span.innerHTML = html.join('');
					TQUtils.GetObj("tq_kefu_main").appendChild(span)
				}
			} else {
				if (TQUtils.GetObj("tq_kefu_main") && (TQUtils.GetObj("tq_kefu_main").getAttribute("version") + "s" != "undefineds")) {
					TQUtils.GetObj("tq_kefu_main").src = TQKF.kefuimg.DOM.onlineImg
				}
			}
			return
		}
		TQKF.kefuimg.AppendDOM();
		TQKF.kefuimg.autiTimer = window.setInterval(TQKF.kefuimg.Anti, 3000);
		setTimeout(function() {
			TQKF.kefuimg.SetPos();
			if (TQKF.kefuimg.userCfg.isfloat == 1 && !TQUtils.isSupportFixedPos) {
				TQUtils.AddEvent(window, "scroll", TQKF.kefuimg.fixPos);
				TQUtils.AddEvent(window, "resize", TQKF.kefuimg.fixPos)
			}
			if (TQKF.kefuimg.userCfg.s == 100 && (TQKF.kefuimg.userCfg.w == "" || TQKF.kefuimg.userCfg.h == "")) TQKF.kefuimg.DOM.style.display = ""
		},
		100)
	}
};
function distrabute() {
	TQKF.kefuimg.Distrabute()
}
if (tq_version == "" || parseInt(tq_version) < parseInt(TQKF.version)) {
	if (tq_online_gif.indexOf(TQKF.image_url + "images/kefu") == -1) {
		TQKF.kefuimg.userCfg.s = 100;
		TQKF.kefuimg.userCfg.on = tq_online_gif;
		TQKF.kefuimg.userCfg.off = tq_offline_gif;
		if (tq_online_gif == "" || tq_offline_gif == "") {
			TQKF.kefuimg.userCfg.s = 1
		}
	} else {
		var reg = new RegExp((TQKF.image_url + "images/kefu([0-2]?[0-9]).gif"), "ig");
		TQKF.kefuimg.userCfg.s = tq_online_gif.replace(reg, "$1");
		TQKF.kefuimg.userCfg.on = "";
		TQKF.kefuimg.userCfg.off = ""
	}
	TQKF.kefuimg.userCfg.isfloat = (tq_invit_close_img_en == "0" ? 0 : 1);
	TQKF.kefuimg.userCfg.isstatic = (tq_invit_close_img == "1" ? 1 : 0);
	TQUtils.SetValueIfUndefinedOrEmpty("tq_acd", "0");
	TQKF.kefuimg.response_type = tq_acd;
	if (TQKF.kefuimg.response_type != 1) {
		tq_member_uins_temp = [];
		var term = {};
		term.n = "";
		term.b = "";
		term.h = "";
		term.m = [];
		for (var j = 0; j < tq_OnUserNameArray.length; j++) {
			var member = {};
			member.t = "tq";
			member.n = tq_OnUserNameArray[j];
			member.id = tq_member_uins[j];
			member.o = tq_OnLineFlagArray[j];
			member.w = tq_member_titles[j];
			term.m.push(member)
		}
		tq_member_uins_temp.push(term);
		tq_member_uins = tq_member_uins_temp
	} else {
		var b = tq_isalloffline == true ? 0 : 1;
		tq_member_uins = [{
			n: "",
			b: "",
			h: "",
			m: [{
				t: "tactic",
				id: tq_tactic_id,
				n: "",
				w: "",
				o: b
			}]
		}]
	}
} else {
	if (typeof(tq_kefuimg_cfg) == "string" && tq_kefuimg_cfg != "") {
		eval("tq_kefuimg_cfg=" + tq_kefuimg_cfg);
		TQUtils.SetValue(tq_kefuimg_cfg, TQKF.kefuimg.userCfg)
	}
	tq_isnoshowuser = TQKF.kefuimg.userCfg.isnoshowuser
}
TQUtils.SetValueIfUndefined("tq_isShowCloseArea_kefu", 0);
if (tq_isShowCloseArea_kefu == 1) TQKF.userDefined.kefuCloseArea.isShow = 1;
if (TQKF.userDefined.kefuCloseArea.isShow == 1 && !(tq_kefuimg_cfg.close)) {
	TQKF.kefuimg.userCfg.close.disp = 1;
	TQKF.kefuimg.userCfg.close.w = TQKF.userDefined.kefuCloseArea.width;
	TQKF.kefuimg.userCfg.close.h = TQKF.userDefined.kefuCloseArea.height;
	TQKF.kefuimg.userCfg.close.r = TQKF.userDefined.kefuCloseArea.rightSpace;
	TQKF.kefuimg.userCfg.close.t = TQKF.userDefined.kefuCloseArea.top
}
if (typeof(tq_member_uins) == "string") {
	if (tq_member_uins != "") eval("tq_member_uins = " + tq_member_uins);
	else {
		tq_member_uins = [{
			m: []
		}]
	}
}
TQKF.kefuimg.response_type = TQKF.kefuimg.GetResponseType();
if (TQKF.kefuimg.response_type == 0) {
	TQKF.chattype = '5';
	try {
		for (var i = 0; i < tq_member_uins[0].m.length; i++) {
			if (i == 0) {
				TQKF.uingroup += tq_member_uins[0].m[i].id
			} else {
				TQKF.uingroup += ("|" + tq_member_uins[0].m[i].id)
			}
		}
	} catch(e) {}
}
TQKF.kefuimg.CreatDOM();
if (TQKF.userDefined.kefuMiniArea.isShow == 1) {
	TQKF.kefuimg.CreatMiniDOM()
}
setTimeout(TQKF.kefuimg.Init, 500);
if (TQKF.isUpdateOnlineFlag == 1) setTimeout(TQKF.kefuimg.GetOnlineStatus, TQKF.getOnlineFlagInteval);
if (typeof(tq_is_minimess) != "undefined" && tq_is_minimess == 2 && TQKF.kefuimg.IfAllOffLine() == true && TQKF.isMinimessLoaded == false) {
	TQUtils.LoadJS(TQKF.userDefined.minimessJS, TQKF.userDefined.defer);
	TQKF.isMinimessLoaded = true
}